package thread;
/**
 * 实现Runnable接口，必须重写run方法*/
public class MyRunnable implements Runnable{
    @Override
    public void run() {
        String name= Thread.currentThread().getName();
        for (int i = 0; i < 10; i++) {
            System.out.println(name+": "+i);
        }
    }
}
